class SendType {
  /// 日志
  static const String log = 'log';

  /// 接口和静态资源测速
  static const String speed = 'speed';

  /// 页面测速
  static const String performance = 'performance';

  /// 离线日志上传
  static const String offline = 'offline';

  /// 白名单
  static const String whiteList = 'whiteList';
  static const String vitals = 'vitals';

  /// pv
  static const String pv = 'pv';

  /// 自定义pv
  static const String customPV = 'customPV';

  /// 自定义事件
  static const String event = 'event';

  /// 自定义测速
  static const String custom = 'custom';

  /// sdk报错
  static const String sdkError = 'sdkError';

  /// webvitals 页面加载耗时
  static const String webvitals = 'webvitals';
}

class Options {
  Options({
    required this.url,
    required this.type,
    this.data = '',
    this.method = Method.GET,
    this.contentType = 'application/x-www-form-urlencoded',
  });
  String url;
  String data;
  Method method;
  String contentType;

  /// 定义在 [SendType] 中
  String type;
}

enum Method {
  GET,
  POST,
}
